package com.yeyks.common.em;

/**
 * @program: admin
 * @description:
 * @author: chenzheng
 * @create: 2019-06-06 13:36
 **/
public enum  SysRoleType {
    //角色
    Administrator("总公司", 1),
    ProvinceManager("省级代理", 2),
    CityAgent("市级代理", 3),
    CityManager("城市运营商", 4),
    HotelManager("酒店管理员", 5),
    ADMIN("运维人员", 6),
    ADMINISTRATOR("超级管理员", 7),
    OPERATE_MERCHANT("运营商", 10),
    SERVICE_MERCHANT("服务商", 11),
    VIP_CARD_MERCHANT("卡商", 12),
    MIN_OPERATE_MERCHANT("小V运营商", 20),
    MIN_SERVICE_MERCHANT("小V服务商", 21),
    MIN_VIP_CARD_MERCHANT("小V卡商", 22);
    // 成员变量
    private String name;
    private long index;
    // 构造方法
    private SysRoleType(String name, long index) {
        this.name = name;
        this.index = index;
    }
    // 普通方法
    public static String getName(long index) {
        for (SysRoleType c : SysRoleType.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public long getIndex() {
        return index;
    }
    public void setIndex(long index) {
        this.index = index;
    }
}
